package com.hjc.answer.controller;

import com.hjc.answer.model.GetPai;
import com.hjc.answer.service.impl.StatisticsServiceImpl;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.CrossOrigin;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

/**
 * Created by IntelliJ IDEA.
 * User: HJC
 * Date: 2019/12/27
 * Time: 9:05
 * To change this template use File | Settings | File Templates.
 */
@RestController
@RequestMapping("/corsgson")
@CrossOrigin
public class Cors {

    @Autowired
    private StatisticsServiceImpl statisticsService;
    @PostMapping("gettarget")
    public List<GetPai> getall(){
        return statisticsService.query_pai();
    }

}
